package com.example.hetong.service.impl;

// import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
// import com.baomidou.mybatisplus.core.metadata.IPage;
// import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
// import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.hetong.dao.ContractMapper;
import com.example.hetong.entity.Contract;
import com.example.hetong.param.ContractParam;
import com.example.hetong.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * --- 业精于勤,荒于嬉 ---
 *
 * @author Song
 * @date 2024/9/11
 * @desc First
 */
@Service
public class ContractServiceImpl implements ContractService {

    @Resource
    private ContractMapper contractMapper;

    @Override
    public List<Contract> finaAll() {
        return contractMapper.findAll();
    }

    @Override
    public boolean delete(int id) {
        return contractMapper.delete(id);
    }

    @Override
    public boolean addList(Contract contract) {
        return contractMapper.addList(contract);
    }

    // @Override
    // public IPage<Contract> page(ContractParam contractParam) {
    //     Page<Contract> page = new Page<>(contractParam.getCurrent(), contractParam.getSize());
    //     QueryWrapper<Contract> queryWrapper = new QueryWrapper<>();
    //     return this.page(page, queryWrapper);
    // }

    @Override
    public List<String> findKuang() {
        return contractMapper.findKuang();
    }

    @Override
    public List<Contract> findByMap(HashMap<String, String> map) {
        return contractMapper.findByMap(map);
    }

}
